#include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
using namespace std;
int main()
{
	int a[]={100,20,10,5,1};
	int n;
	while(scanf("%d",&n)!=EOF)
	{
		int cnt = 0;
		for(int i = 0;n>0;)
		{
			if(n>=a[i])
			{
			//	printf("%d\n",a[i]);
			//	printf("*****\n");
				n = n-a[i];
				cnt++;
			}
			else i++;
		}
		printf("%d\n",cnt);
	}
} 
